SetValue
TheSetValue
method writes data to the currently focused value, starting at the offset (inclusive).
void SetValue (in ODByteArray value);
value
- A byte array whose buffer contains the data to be written.
DISCUSSION
You call this method to write data to the currently focused value. If that value currently is a promise value, the promise is fulfilled before the data is written.This method writes data to the focused value, starting at the current offset, and overwrites any data at and beyond the offset. If the current offset plus the length of data being written is greater than the current size of the value (as returned by the
GetSize
method), the size of the value is automatically increased to accommodate the new data.When you no longer need the structure you pass as the
value
parameter, you should deallocate that structure and its buffer.EXCEPTIONS
kODErrUnfocusedStorageUnit
- This storage unit is not focused on a value.
kODErrZeroRefCount
- This storage unit has a reference count of 0.
SEE ALSO
TheODByteArray
type (page 877).
TheODStorageUnit::GetSize
method (page 695).
TheODStorageUnit::GetValue
method (page 698).
"Manipulating the Data in a Value" on page 276 in OpenDoc Programmer's Guide.
"The Externalize Method" on page 298 in OpenDoc Programmer's Guide.
"Creating Additional Storage Units" on page 301 in OpenDoc Programmer's Guide.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help